<?
// Page variables
$rightCol   = 1;
include("includes/functions.php"); 

// Get newsletter records
$sqlNL = "SELECT * from transNewsletters WHERE Active = '1' ORDER BY DateAdded";
$resultNL = mysql_db_query($dbname,$sqlNL);
$rows = mysql_num_rows($resultNL);
include("includes/header.php"); ?>
	<div id="pageTop"></div>
	<div id="pageContent">
		<? include("includes/menu_main.php"); ?>
		
		<div id="rightCol">
			<img src="images/rightColTop.gif">
			<? include("includes/rightCol.php");  ?>
		</div>
		
		<div id="mainContent">
			<h1>Newsletters</h1>
		
			<p>
			<ul class="ulMain">	
				<?
				if ($rows>0) {
					while ($value = mysql_fetch_assoc($resultNL)) {
						$title = stripslashes($value[Title]);
						$desc  = stripslashes($value[NLDescription]);
						$url   = $value[NLLink];
						echo "<li>\n";
						if (!empty($url)) { echo "<a href=\"$url\" target=\"_blank\" title=\"Visit $url\">"; }
						echo "<b>$title</b><br />\n";
						if (!empty($url)) { echo "</a>"; }
						if (!empty($desc)) { echo $desc; }
						echo "</li>\n";
					}
				} else {
					echo "<li>There are no newsletters at this time.</li>\n";
				}
				?>
			</ul>
  		</p>
			
			<div class="spacer2" style="height: 800px;"></div>
		</div>
		
	</div>
<? include("includes/footer.php"); ?>